#!/bin/sh
# postinst script for pdns

set -e

case "$1" in
    configure)
        if [ -z $2 ]; then
            update-rc.d pdns defaults 15 85 > /dev/null
            invoke-rc.d pdns start
        else
            invoke-rc.d pdns status > /dev/null
            [ $? -eq 3 ] || invoke-rc.d pdns restart
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0
